# {'success': False, 'code': 20001, 'message': '用户名或密码错误', 'data': None}
# 创建ihrm人力资源管理项目登录 api接口

import requests

class iHrmLoginApi(object):
    @classmethod
    def iHrmlogin(self,session,login_data):
        resq = session.post(url='https://ihrm-java.itheima.net/api/sys/login',
                    headers = {'content-type':'application/json;charset=UTF-8'},
                    json= login_data)
        return resq

if __name__ == '__main__':
    session = requests.Session()
    data = {"mobile":"13800000002","password":"929itheima.CN032@.20250103"}
    print(iHrmLoginApi.iHrmlogin(session, data).text)
    print(type(iHrmLoginApi.iHrmlogin(session, data)))